/**
 * Copyright (c) 2020 kedacom
 * OpenATC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 * http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 **/
<template>
  <div class="licenseInfo">
    <el-dialog
      :title="$t('openatc.about.opensourceagreement')"
      :visible.sync="licenseInfoVisible"
      width="60%"
      height="914px"
      @close='closeFormDialog'>
      <div>
        <div class="content-container chinese-version">
          <h2 class="title">1.木兰宽松许可证, 第2版</h2>
          <div class="content">
              <p><strong>木兰宽松许可证， 第2版</strong></p>
              <p style="margin-bottom: 20px">2020年1月 <a href="http://license.coscl.org.cn/MulanPSL2">http://license.coscl.org.cn/MulanPSL2</a></p>

              <p style="text-indent: 2em">您对“软件”的复制、使用、修改及分发受木兰宽松许可证，第2版（“本许可证”）的如下条款的约束：</p>

              <div style="text-indent: 2em">
                  <p><strong>0.&nbsp;&nbsp;&nbsp;定义</strong></p>
                  <p><strong>“软件”</strong> 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。</p>
                  <p><strong>“贡献”</strong> 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。</p>
                  <p><strong>“贡献者”</strong> 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。</p>
                  <p><strong>“法人实体”</strong> 是指提交贡献的机构及其“关联实体”。</p>
                  <p><strong>“关联实体”</strong> 是指，对“本许可证”下的行为方而言，控制、受控制或与其共同受控制的机构，此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。</p>
              </div>

              <div style="text-indent: 2em">
                  <p><strong>1.&nbsp;&nbsp;&nbsp;授予版权许可</strong></p>
                  <p>每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可，您可以复制、使用、修改、分发其“贡献”，不论修改与否。</p>
              </div>

              <div style="text-indent: 2em">
                  <p><strong>2.&nbsp;&nbsp;&nbsp;授予专利许可</strong></p>
                  <p>每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的（根据本条规定撤销除外）专利许可，供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求，不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地，就“软件”或其中的“贡献”对任何人发起专利侵权诉讼（包括反诉或交叉诉讼）或其他专利维权行动，指控其侵犯专利权，则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。</p>
              </div>

              <div style="text-indent: 2em">
                  <p><strong>3.&nbsp;&nbsp;&nbsp;无商标许可</strong></p>
                  <p>“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可，但您为满足第4条规定的声明义务而必须使用除外。</p>
              </div>

              <div style="text-indent: 2em">
                  <p><strong>4.&nbsp;&nbsp;&nbsp;分发限制</strong></p>
                  <p>您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发，不论修改与否，但您必须向接收者提供“本许可证”的副本，并保留“软件”中的版权、商标、专利及免责声明。</p>
              </div>

              <div style="text-indent: 2em">
                  <p><strong>5.&nbsp;&nbsp;&nbsp;免责声明与责任限制</strong></p>
                  <p><strong>“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下，“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任，不论因何种原因导致或者基于何种法律理论，即使其曾被建议有此种损失的可能性。</strong></p>
              </div>

              <div style="text-indent: 2em">
                  <p><strong>6.&nbsp;&nbsp;&nbsp;语言</strong></p>
                  <p><strong>“本许可证”以中英文双语表述，中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致，以中文版为准。</strong></p>
              </div>

              <p style="margin-bottom: 20px"><strong>条款结束</strong></p>
          </div>
        </div>

        <div class="content-container english-version">
          <h2 class="title">Mulan Permissive Software License，Version 2</h2>
          <div class="content">
              <p><strong>Mulan Permissive Software License，Version 2 (Mulan PSL v2)</strong></p>
              <p style="margin-bottom: 20px">January 2020 <a href="http://license.coscl.org.cn/MulanPSL2">http://license.coscl.org.cn/MulanPSL2</a></p>

              <p>Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions:</p>
              <p><strong>0.&nbsp;Definition</strong></p>
              <div>
                  <p><strong>Software</strong> means the program and related documents which are licensed under this License and comprise all Contribution(s).</p>
                  <p><strong>Contribution</strong> means the copyrightable work licensed by a particular Contributor under this License.</p>
                  <p><strong>Contributor</strong> means the Individual or Legal Entity who licenses its copyrightable work under this License.</p>
                  <p><strong>Legal Entity</strong> means the entity making a Contribution and all its Affiliates.</p>
                  <p><strong>Affiliates</strong> means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity.</p>
              </div>

              <p><strong>1.&nbsp;Grant of Copyright License</strong></p>
              <div>
                  <p>Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not.</p>
              </div>

              <p><strong>2.&nbsp;Grant of Patent License</strong></p>
              <div>
                  <p>Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken.</p>
              </div>

              <p><strong>3.&nbsp;No Trademark License</strong></p>
              <div>
                  <p>No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4.</p>
              </div>

              <p><strong>4.&nbsp;Distribution Restriction</strong></p>
              <div>
                  <p>You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software.</p>
              </div>

              <p><strong>5.&nbsp;Disclaimer of Warranty and Limitation of Liability</strong></p>
              <div>
                  <p>THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
              </div>

              <p><strong>6.&nbsp;Language</strong></p>
              <div>
                  <p>THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL.</p>
              </div>

              <p style="margin-bottom: 20px"><strong>END OF THE TERMS AND CONDITIONS</strong></p>
            </div>
        </div>
        <br/>

        <div class="content-container english-version">
          <h2 class="title">2.Apache Software License version 2.0</h2>
          <div class="content">
              <p><strong>Apache License Version 2.0</strong></p>
              <p style="margin-bottom: 20px">January 2004 <a href="http://www.apache.org/licenses/">http://www.apache.org/licenses/</a></p>

              <p>Your reproduction, use, modification and distribution of the Software shall be subject to Apache Software License version 2.0 (this License) with the following terms and conditions:</p>
              <p><strong>1.&nbsp;Definition</strong></p>
              <div>
                  <p><strong>License</strong> shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.</p>
                  <p><strong>Licensor</strong> shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.</p>
                  <p><strong>Legal Entity</strong> shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.</p>
                  <p><strong>"You" (or "Your")</strong> shall mean an individual or Legal Entity exercising permissions granted by this License.</p>
                  <p><strong>"Source" form</strong> shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.</p>
                  <p><strong>"Object" form</strong> shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.</p>
                  <p><strong>Work</strong> shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).</p>
                  <p><strong>Derivative Works</strong> shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.</p>
                  <p><strong>Contribution</strong> shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."</p>
                  <p><strong>Contributor</strong> shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.</p>
              </div>

              <p><strong>2.&nbsp;Grant of Copyright License</strong></p>
              <div>
                  <p>Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.</p>
              </div>

              <p><strong>3.&nbsp;Grant of Patent License</strong></p>
              <div>
                  <p>Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.</p>
              </div>

              <p><strong>4.&nbsp;No Trademark License</strong></p>
              <div>
                  <p>You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:</p>
                  <p>You must give any other recipients of the Work or Derivative Works a copy of this License; and
                    You must cause any modified files to carry prominent notices stating that You changed the files; and
                    You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
                    If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.</p>
                  <p>You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.</p>
              </div>

              <p><strong>5.&nbsp;Submission of Contributions.</strong></p>
              <div>
                  <p>Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.</p>
              </div>

              <p><strong>6.&nbsp;Trademarks.</strong></p>
              <div>
                  <p> This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.</p>
              </div>

              <p><strong>7.&nbsp;Disclaimer of Warranty. </strong></p>
              <div>
                  <p>Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.</p>
              </div>

              <p><strong>8.&nbsp;Limitation of Liability.  </strong></p>
              <div>
                  <p>In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.</p>
              </div>

              <p><strong>9.&nbsp;Accepting Warranty or Additional Liability. </strong></p>
              <div>
                  <p>While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.</p>
              </div>

              <p style="margin-bottom: 20px"><strong>END OF THE TERMS AND CONDITIONS</strong></p>
            </div>
          </div>
          <br/>

          <div class="content-container english-version">
            <h2 class="title">3.The MIT License</h2>
            <div class="content">
                <p><strong>Version N/A SPDX short identifier: MIT</strong></p>
                <p style="margin-bottom: 20px"> <a href="https://opensource.org/license/MIT">https://opensource.org/license/MIT</a></p>

                <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
                <!-- <p><strong>0.&nbsp;Definition</strong></p> -->
                <div>
                    <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
                </div>

                <div>
                    <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
                </div>

                <p style="margin-bottom: 20px"><strong>END OF THE TERMS AND CONDITIONS</strong></p>
              </div>
          </div>
          <br/>
    </div>
    </el-dialog>
  </div>
</template>

<script>
/**
  Auth: yangdongyang
  Created: 2020/09/10
*/
export default {
  data () {
    return {
      licenseInfoVisible: false
    }
  },
  name: 'licenseInfo',
  props: {},
  watch: {
    deep: true
  },
  methods: {
    showMessage () {
      this.licenseInfoVisible = !this.licenseInfoVisible
    },
    closeFormDialog () {
      this.licenseInfoVisible = false
    }
  }
}
</script>

<style lang="scss" rel="stylesheet/scss">
// .licenseInfo {
//     display: flex;
//     justify-content: center;
//     align-items: Center;
//     overflow: hidden;
//     .el-dialog {
//         height: 70%;
//         overflow: hidden;
//         .el-dialog__body {
//             padding: 30px 20px;
//             color: $--color-text-regular;
//             font-size: 14px;
//             word-break: break-all;
//             position: absolute;
//             left: 0;
//             top: 70px;
//             bottom: 30px;
//             z-index: 1;
//             overflow: hidden;
//             overflow-y: auto;
//         }
//     }
// }
// .licenseInfo .el-dialog__headerbtn .el-dialog__close {
//     color: $--color-white;
// }
// .licenseInfo .el-dialog__header {
//     padding: 30px 10px 10px;
//     height: 69px;
//     background-color: $--color-primary;
//     border-radius: 4px 4px 0px 0p
// }
// .licenseInfo .el-dialog__title {
//     font-size: 20px;
//     font-weight: normal;
//     font-stretch: normal;
//     line-height: 14px;
//     letter-spacing: 0px;
//     color: $--color-white;
// }
</style>
